package com.hlk.feign;

import com.hlk.config.ServiceConstant;
import com.hlk.feign.fallback.UserFeignClientFallbackFactory;
import com.hlk.result.Result;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * @author hlk
 * @version 1.0
 * @date 2021-01-18 11:59
 */
@Component
@FeignClient(name = ServiceConstant.USER_SERVICE, fallback = UserFeignClientFallbackFactory.class)
public interface UserFeignClient {

    @ApiOperation(value = "根据用户的ids查询用户列表")
    @GetMapping("user/queryByIds")
    Result queryByIds(@RequestParam String userIds);
}
